<div>
  <!-- 添加分类按钮 -->
  <el-button type="success" plain @click="$router.push(&quot;/goods-add&quot;)"
    >添加商品</el-button
  >

  <!-- 表格 -->
  <el-table :data="goodsList" style="width: 100%">
    <el-table-column type="index" width="50"> </el-table-column>
    <el-table-column prop="goods_name" label="商品名称" width="180">
    </el-table-column>
    <el-table-column prop="goods_price" label="商品价值" width="180">
    </el-table-column>
    <el-table-column prop="goods_number" label="商品数量"> </el-table-column>
    <el-table-column prop="add_time" label="创建时间">
      <template slot-scope="scope">
        <span>{{ scope.row.add_time | dateformat('YYYY-MM-DD HH:mm:ss')}}</span>
      </template>
    </el-table-column>
    <el-table-column label="操作">
      <template slot-scope="scope">
        <el-button
          type="primary"
          size="mini"
          plain
          icon="el-icon-edit"
        ></el-button>
        <el-button
          type="danger"
          size="mini"
          plain
          icon="el-icon-delete"
        ></el-button>
      </template>
    </el-table-column>
  </el-table>
  <!-- 分页 -->
  <el-pagination
    background
    layout="prev, pager, next"
    :page-size="4"
    :current-page="pagenum-0"
    :total="total"
    @current-change="pageChange"
  >
  </el-pagination>
</div>
